

typedef int ElementType;

enum {
    BLACK,
    RED,
} COLOR;

typedef struct rbtreenode 
{
    struct rbtreenode *left;
    struct rbtreenode *right;
    struct rbtreenode *parent;
    ElementType value;
    int color;
} *pRbTreeNode;

typedef struct rbtree
{
    rbtreenode *root;
    int elements;
} *pRbTree;

void init_rbtree(rbtree *tree);

void insert_rbtree(rbtree *tree, ElementType value);

void delete_rbtree(rbtree *tree, ElementType value);

void print_rbtree(rbtree *tree);